home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Shape Smash / shape-smash.swf / scripts / Box2D / Common / Math / b2Vec2.as < prev   
Encoding:
Text File  |  2010-05-14  |  3.4 KB  |  155 lines

  1. package Box2D.Common.Math
  2. {
  3.    public class b2Vec2
  4.    {
  5.       public var x:Number;
  6.       
  7.       public var y:Number;
  8.       
  9.       public function b2Vec2(param1:Number = 0, param2:Number = 0)
  10.       {
  11.          super();
  12.          x = param1;
  13.          y = param2;
  14.       }
  15.       
  16.       public static function _tr487(param1:Number, param2:Number) : b2Vec2
  17.       {
  18.          return new b2Vec2(param1,param2);
  19.       }
  20.       
  21.       public function _kw283() : b2Vec2
  22.       {
  23.          return new b2Vec2(-x,-y);
  24.       }
  25.       
  26.       public function _pj600(param1:b2Vec2) : void
  27.       {
  28.          x = x < param1.x ? x : param1.x;
  29.          y = y < param1.y ? y : param1.y;
  30.       }
  31.       
  32.       public function _rd365(param1:Number) : void
  33.       {
  34.          var _loc2_:Number = NaN;
  35.          _loc2_ = x;
  36.          x = -param1 * y;
  37.          y = param1 * _loc2_;
  38.       }
  39.       
  40.       public function _bx376(param1:Number) : void
  41.       {
  42.          x *= param1;
  43.          y *= param1;
  44.       }
  45.       
  46.       public function _hj410() : void
  47.       {
  48.          if(x < 0)
  49.          {
  50.             x = -x;
  51.          }
  52.          if(y < 0)
  53.          {
  54.             y = -y;
  55.          }
  56.       }
  57.       
  58.       public function _dt39() : Boolean
  59.       {
  60.          return _ui293._to78(x) && _ui293._to78(y);
  61.       }
  62.       
  63.       public function _ib196() : b2Vec2
  64.       {
  65.          return new b2Vec2(x,y);
  66.       }
  67.       
  68.       public function _vq65(param1:Number) : void
  69.       {
  70.          var _loc2_:Number = NaN;
  71.          _loc2_ = x;
  72.          x = param1 * y;
  73.          y = -param1 * _loc2_;
  74.       }
  75.       
  76.       public function _xq48(param1:b2Vec2) : void
  77.       {
  78.          x -= param1.x;
  79.          y -= param1.y;
  80.       }
  81.       
  82.       public function _kh737(param1:b2Vec2) : void
  83.       {
  84.          x = param1.x;
  85.          y = param1.y;
  86.       }
  87.       
  88.       public function _mc262(param1:_oh327) : void
  89.       {
  90.          var _loc2_:Number = NaN;
  91.          _loc2_ = _ui293._qr29(this,param1.col1);
  92.          y = _ui293._qr29(this,param1.col2);
  93.          x = _loc2_;
  94.       }
  95.       
  96.       public function _eh77(param1:b2Vec2) : void
  97.       {
  98.          x = x > param1.x ? x : param1.x;
  99.          y = y > param1.y ? y : param1.y;
  100.       }
  101.       
  102.       public function _qi627() : Number
  103.       {
  104.          var _loc1_:Number = NaN;
  105.          var _loc2_:Number = NaN;
  106.          _loc1_ = Math.sqrt(x * x + y * y);
  107.          if(_loc1_ < Number.MIN_VALUE)
  108.          {
  109.             return 0;
  110.          }
  111.          _loc2_ = 1 / _loc1_;
  112.          x *= _loc2_;
  113.          y *= _loc2_;
  114.          return _loc1_;
  115.       }
  116.       
  117.       public function _br741(param1:Number = 0, param2:Number = 0) : void
  118.       {
  119.          x = param1;
  120.          y = param2;
  121.       }
  122.       
  123.       public function _um807(param1:b2Vec2) : void
  124.       {
  125.          x += param1.x;
  126.          y += param1.y;
  127.       }
  128.       
  129.       public function _cj629(param1:_oh327) : void
  130.       {
  131.          var _loc2_:Number = NaN;
  132.          _loc2_ = x;
  133.          x = param1.col1.x * _loc2_ + param1.col2.x * y;
  134.          y = param1.col1.y * _loc2_ + param1.col2.y * y;
  135.       }
  136.       
  137.       public function _rq734() : Number
  138.       {
  139.          return x * x + y * y;
  140.       }
  141.       
  142.       public function _tq10() : Number
  143.       {
  144.          return Math.sqrt(x * x + y * y);
  145.       }
  146.       
  147.       public function _he34() : void
  148.       {
  149.          x = 0;
  150.          y = 0;
  151.       }
  152.    }
  153. }
  154.  
  155.